Optimal. Leaf size=280 \[ \frac{\sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{\sqrt{2 \left (1+\sqrt{2}\right )}-2 \sqrt{\tan (e+f x)+1}}{\sqrt{2 \left (\sqrt{2}-1\right )}}\right )}{2 f}-\frac{\sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{2 \sqrt{\tan (e+f x)+1}+\sqrt{2 \left (1+\sqrt{2}\right )}}{\sqrt{2 \left (\sqrt{2}-1\right )}}\right )}{2 f}+\frac{\log \left (\tan (e+f x)-\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{\tan (e+f x)+1}+\sqrt{2}+1\right )}{4 \sqrt{1+\sqrt{2}} f}-\frac{\log \left (\tan (e+f x)+\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{\tan (e+f x)+1}+\sqrt{2}+1\right )}{4 \sqrt{1+\sqrt{2}} f}+\frac{\tanh ^{-1}\left (\sqrt{\tan (e+f x)+1}\right )}{f}-\frac{\sqrt{\tan (e+f x)+1} \cot (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.3989, antiderivative size = 280, normalized size of antiderivative = 1., number of steps used = 19, number of rules used = 15, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.714, Rules used = {3569, 3632, 21, 3573, 12, 3485, 708, 1094, 634, 618, 204, 628, 3634, 63, 207} \[ \frac{\sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{\sqrt{2 \left (1+\sqrt{2}\right )}-2 \sqrt{\tan (e+f x)+1}}{\sqrt{2 \left (\sqrt{2}-1\right )}}\right )}{2 f}-\frac{\sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{2 \sqrt{\tan (e+f x)+1}+\sqrt{2 \left (1+\sqrt{2}\right )}}{\sqrt{2 \left (\sqrt{2}-1\right )}}\right )}{2 f}+\frac{\log \left (\tan (e+f x)-\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{\tan (e+f x)+1}+\sqrt{2}+1\right )}{4 \sqrt{1+\sqrt{2}} f}-\frac{\log \left (\tan (e+f x)+\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{\tan (e+f x)+1}+\sqrt{2}+1\right )}{4 \sqrt{1+\sqrt{2}} f}+\frac{\tanh ^{-1}\left (\sqrt{\tan (e+f x)+1}\right )}{f}-\frac{\sqrt{\tan (e+f x)+1} \cot (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3569
Rule 3632
Rule 21
Rule 3573
Rule 12
Rule 3485
Rule 708
Rule 1094
Rule 634
Rule 618
Rule 204
Rule 628
Rule 3634
Rule 63
Rule 207
Rubi steps
\begin{align*} \int \frac{\cot ^2(e+f x)}{\sqrt{1+\tan (e+f x)}} \, dx &=-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\int \frac{\cot (e+f x) \left (\frac{1}{2}+\tan (e+f x)+\frac{1}{2} \tan ^2(e+f x)\right )}{\sqrt{1+\tan (e+f x)}} \, dx\\ &=-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\int \cot (e+f x) \left (\frac{1}{2}+\frac{1}{2} \tan (e+f x)\right ) \sqrt{1+\tan (e+f x)} \, dx\\ &=-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\frac{1}{2} \int \cot (e+f x) (1+\tan (e+f x))^{3/2} \, dx\\ &=-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\frac{1}{2} \int \frac{2}{\sqrt{1+\tan (e+f x)}} \, dx-\frac{1}{2} \int \frac{\cot (e+f x) \left (1+\tan ^2(e+f x)\right )}{\sqrt{1+\tan (e+f x)}} \, dx\\ &=-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\frac{\operatorname{Subst}\left (\int \frac{1}{x \sqrt{1+x}} \, dx,x,\tan (e+f x)\right )}{2 f}-\int \frac{1}{\sqrt{1+\tan (e+f x)}} \, dx\\ &=-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\frac{\operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\sqrt{1+\tan (e+f x)}\right )}{f}-\frac{\operatorname{Subst}\left (\int \frac{1}{\sqrt{1+x} \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\tanh ^{-1}\left (\sqrt{1+\tan (e+f x)}\right )}{f}-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\frac{2 \operatorname{Subst}\left (\int \frac{1}{2-2 x^2+x^4} \, dx,x,\sqrt{1+\tan (e+f x)}\right )}{f}\\ &=\frac{\tanh ^{-1}\left (\sqrt{1+\tan (e+f x)}\right )}{f}-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{2 \left (1+\sqrt{2}\right )}-x}{\sqrt{2}-\sqrt{2 \left (1+\sqrt{2}\right )} x+x^2} \, dx,x,\sqrt{1+\tan (e+f x)}\right )}{2 \sqrt{1+\sqrt{2}} f}-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{2 \left (1+\sqrt{2}\right )}+x}{\sqrt{2}+\sqrt{2 \left (1+\sqrt{2}\right )} x+x^2} \, dx,x,\sqrt{1+\tan (e+f x)}\right )}{2 \sqrt{1+\sqrt{2}} f}\\ &=\frac{\tanh ^{-1}\left (\sqrt{1+\tan (e+f x)}\right )}{f}-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}-\frac{\operatorname{Subst}\left (\int \frac{1}{\sqrt{2}-\sqrt{2 \left (1+\sqrt{2}\right )} x+x^2} \, dx,x,\sqrt{1+\tan (e+f x)}\right )}{2 \sqrt{2} f}-\frac{\operatorname{Subst}\left (\int \frac{1}{\sqrt{2}+\sqrt{2 \left (1+\sqrt{2}\right )} x+x^2} \, dx,x,\sqrt{1+\tan (e+f x)}\right )}{2 \sqrt{2} f}+\frac{\operatorname{Subst}\left (\int \frac{-\sqrt{2 \left (1+\sqrt{2}\right )}+2 x}{\sqrt{2}-\sqrt{2 \left (1+\sqrt{2}\right )} x+x^2} \, dx,x,\sqrt{1+\tan (e+f x)}\right )}{4 \sqrt{1+\sqrt{2}} f}-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{2 \left (1+\sqrt{2}\right )}+2 x}{\sqrt{2}+\sqrt{2 \left (1+\sqrt{2}\right )} x+x^2} \, dx,x,\sqrt{1+\tan (e+f x)}\right )}{4 \sqrt{1+\sqrt{2}} f}\\ &=\frac{\tanh ^{-1}\left (\sqrt{1+\tan (e+f x)}\right )}{f}+\frac{\log \left (1+\sqrt{2}+\tan (e+f x)-\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{1+\tan (e+f x)}\right )}{4 \sqrt{1+\sqrt{2}} f}-\frac{\log \left (1+\sqrt{2}+\tan (e+f x)+\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{1+\tan (e+f x)}\right )}{4 \sqrt{1+\sqrt{2}} f}-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}+\frac{\operatorname{Subst}\left (\int \frac{1}{2 \left (1-\sqrt{2}\right )-x^2} \, dx,x,-\sqrt{2 \left (1+\sqrt{2}\right )}+2 \sqrt{1+\tan (e+f x)}\right )}{\sqrt{2} f}+\frac{\operatorname{Subst}\left (\int \frac{1}{2 \left (1-\sqrt{2}\right )-x^2} \, dx,x,\sqrt{2 \left (1+\sqrt{2}\right )}+2 \sqrt{1+\tan (e+f x)}\right )}{\sqrt{2} f}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{2 \left (1+\sqrt{2}\right )}-2 \sqrt{1+\tan (e+f x)}}{\sqrt{2 \left (-1+\sqrt{2}\right )}}\right )}{2 \sqrt{-1+\sqrt{2}} f}-\frac{\tan ^{-1}\left (\frac{\sqrt{2 \left (1+\sqrt{2}\right )}+2 \sqrt{1+\tan (e+f x)}}{\sqrt{2 \left (-1+\sqrt{2}\right )}}\right )}{2 \sqrt{-1+\sqrt{2}} f}+\frac{\tanh ^{-1}\left (\sqrt{1+\tan (e+f x)}\right )}{f}+\frac{\log \left (1+\sqrt{2}+\tan (e+f x)-\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{1+\tan (e+f x)}\right )}{4 \sqrt{1+\sqrt{2}} f}-\frac{\log \left (1+\sqrt{2}+\tan (e+f x)+\sqrt{2 \left (1+\sqrt{2}\right )} \sqrt{1+\tan (e+f x)}\right )}{4 \sqrt{1+\sqrt{2}} f}-\frac{\cot (e+f x) \sqrt{1+\tan (e+f x)}}{f}\\ \end{align*}
Mathematica [C] time = 0.238339, size = 101, normalized size = 0.36 \[ -\frac{-2 \tanh ^{-1}\left (\sqrt{\tan (e+f x)+1}\right )+(1-i)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{\tan (e+f x)+1}}{\sqrt{1-i}}\right )+(1+i)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{\tan (e+f x)+1}}{\sqrt{1+i}}\right )+2 \sqrt{\tan (e+f x)+1} \cot (e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.504, size = 7217, normalized size = 25.8 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot \left (f x + e\right )^{2}}{\sqrt{\tan \left (f x + e\right ) + 1}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.1368, size = 2851, normalized size = 10.18 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot ^{2}{\left (e + f x \right )}}{\sqrt{\tan{\left (e + f x \right )} + 1}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot \left (f x + e\right )^{2}}{\sqrt{\tan \left (f x + e\right ) + 1}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]